//
//  UIScreen+JCAllScreen.m
//  JCPublicKit-Objc
//
//  Created by JasonLee on 2020/4/24.
//

#import "UIScreen+JCAllScreen.h"

@implementation UIScreen (JCAllScreen)

- (BOOL)jc_isScreenAllScreenType {
    if (@available(iOS 11.0, *)) {
        UIWindow* window = [UIApplication.sharedApplication keyWindow];
        if (window != nil) {
            if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
                return window.safeAreaInsets.left > 0.0f;
            }else {
                // ios12 非刘海屏状态栏 20.0f
                return window.safeAreaInsets.top > 20.0f;
            }
        }
    }
    return NO;
}

@end
